#pragma once
#include "glib.h"

class CMarkupEX : public CMarkup
{
public:
	CMarkupEX(void);
	~CMarkupEX(void);

	enum ValueType
	{
		VALTYPE_HEX,
		VALTYPE_OCT,
		VALTYPE_RGB,
		VALTYPE_ASM,
		VALTYPE_DEC,
		VALTYPE_BIN
	};

	void AddValue(LPCTSTR name, u32 value, ValueType type);
	u32 GetValue(LPCTSTR name);
	void SetValue(LPCTSTR name, u32 value, ValueType type);
	void SetChildValue(LPCTSTR name, u32 value, ValueType type);

	int Open(LPCTSTR file_name);
	int Save(LPCTSTR file_name);

	void SetSignature() {SetDoc(_T("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n"));}
};

u32 GetStringValue(LPCTSTR val_str);
GString SetStringValue(u32 value, CMarkupEX::ValueType type);
